package org.example.infrastructure.persistence.orm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.domain.model.entity.url.UrlShortenerBrowserStats;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsReq;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface UrlShortenerBrowserStatsMapper extends BaseMapper<UrlShortenerBrowserStats> {
    void insertUrlShortenerBrowserStats(UrlShortenerBrowserStats urlShortenerBrowserStats);

    /** 根据短链接获取指定日期内浏览器监控数据 */
    List<HashMap<String, Object>> browserStatsByUrlShortenerList(@Param(value = "param") UrlShortenerStatsReq urlShortenerStatsReq);

    /** 根据分组获取指定日期内浏览器监控数据 */
    List<HashMap<String, Object>> browserStatsByGroupList(@Param(value = "param") UrlShortenerGroupStatsReq urlShortenerGroupStatsReq);
}
